<?php

mysql_connect("HOSTNAME", "USERNAME", "PASSWORD") or die("Cannot connect");
mysql_select_db("PASSWORD");

function my_mysql_query( $sql )
{   
   $result = mysql_query( $sql );

   if ( ! $result ) {
       error_log( "DB Error, could not query the database" );
       error_log( "MySQL Error: " . mysql_error() );
       exit;
   }
   
   return $result;
}
?>
